namespace FFF.Test.Application.Repositories.Demo
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using Abp.Domain.Repositories;
    using Abp.EntityFrameworkCore;
    using Abp.ObjectMapping;
    using FFF.Test.DataAccess.Framework;
    using FFF.Test.Application.Repositories.Demo;
    using FFF.Test.Entity.Demo;
    using FFF.Test.Entity.Demo.Dto;
    using FFF.Test.Entity.Demo.View;
    using FFF.Test.Application.PublicService.AppService.TreeGrid;

    /// <summary>
    /// 学生表仓储接口
    /// </summary>
    public interface IDemoStudent2Repository :
        IRepository<DemoStudent2Entity,
        Guid>, IRepositoriesBase<DemoStudent2Entity, Guid, DemoStudent2CreateInputDto, DemoStudent2UpdateInputDto, DemoStudent2Dto, ViewDemoStudent2, ViewDemoStudent2>
    {
        /// <summary>
        /// 1._7_024批量同步(fff,商户平台)
        /// </summary>
        /// <param name="inDto">批量同步输入dto</param>
        /// <returns>批量同步输出dto</returns>
        Task<BatchSyncAsyncOutDto> BatchSyncAsyncAsync(BatchSyncAsyncInDto inDto);

        /// <summary>
        /// 判断学生姓名是否存在
        /// </summary>
        /// <param name="studentName">Name of the student.</param>
        /// <returns>是否为1</returns>
        /// <remarks>ydm 2021-08-10</remarks>
        Task<bool> IsExistStudentNameAsync(string studentName);

        /// <summary>
        /// 判断添加时学生Id是否为1
        /// </summary>
        /// <param name="id">The identifier.</param>
        /// <returns>是否为1</returns>
        /// <remarks>ydm 2021-08-10</remarks>
        Task<bool> IsAddStudentIdAsync(string id);

        /// <summary>
        /// 判断添加时学生的id是否为100
        /// </summary>
        /// <param name="id">The identifier.</param>
        /// <returns>是否为1</returns>
        /// <remarks>ydm 2021-08-10</remarks>
        Task<bool> IsEditStudentIdAsync(string id);

        /// <summary>
        /// 判断学生等级是否为学霸
        /// </summary>
        /// <param name="demoStudent2StudentLevel">The demo student2 student level.</param>
        /// <returns>是否为1</returns>
        /// <remarks>ydm 2021-08-10</remarks>
        Task<bool> IsStraightAsync(DemoStudent2StudentLevelEnum demoStudent2StudentLevel);

        /// <summary>
        /// 进行分组查询
        /// </summary>
        /// <param name="indto">The indto.</param>
        /// <returns> 分页对象</returns>
        /// <remarks>ydm 2021-08-12</remarks>
        Task<List<GetStuGroupGradeOutDto>> GetStuDtoGroupByGradeAsync(GetStuGroupGradeInDto indto);

        /// <summary>
        /// 根据年龄和性别进行查询
        /// </summary>
        /// <param name="indto">The indto.</param>
        /// <returns>学生dto</returns>
        /// <remarks>ydm 2021-08-12</remarks>
        Task<GetStuDtoByAgeAndSexOutDto> GetStuDtoByAgeAndSexAsync(GetStuDtoByAgeAndSexInDto indto);

        /// <summary>
        /// 批量更新
        /// </summary>
        /// <param name="studentAge">学生年龄</param>
        /// <returns>Task&lt;System.Int32&gt;.</returns>
        /// <remarks>ydm 2021-08-12</remarks>
        Task<bool> BatchUpdateAsync(int studentAge);

        /// <summary>
        /// 批量插入
        /// </summary>
        /// <param name="student2Entitys">The indto.</param>
        /// <returns>是否成功</returns>
        /// <remarks>ydm 2021-08-12</remarks>
        Task<bool> BatchInsertAsync(List<DemoStudent2Entity> student2Entitys);
    }

}
